import { request } from '../utils/pyclient.js'

export async function getAppStoreList() {
    return await request("get_app_store_list", {})
}

export async function getInstalledAppList() {
    return await request("get_installed_app_list", {})
}

export async function configureApp(appKey, config) {
    return await request("configure_app", {
        app_key: appKey,
        config: config
    })
}

export async function uninstallApp(appKey) {
    return await request("uninstall_app", {
        app_key: appKey
    })
}

export async function renewApp(appKey, months = 1) {
    return await request("renew_app", {
        app_key: appKey,
        months: months
    })
}

export async function startApp(appKey) {
    return await request("start_app", {
        app_key: appKey
    })
}

export async function stopApp(appKey) {
    return await request("stop_app", {
        app_key: appKey
    })
}
